}else{?>
}?>
Adresa: ".$result['adresa']."";
?>
, judetul
if ($result['comision']){
echo "
Comision perceput: ".$result['comision']."%
";
}
if ($result['nr_agenti']){
echo "
Agenti imobiliari: ".$result['nr_agenti']."
";
}
if ($result['web']){
$target=' target="_blank"';
echo "
Web: ".$result['web']."
";
}?>
Contacteaza agentia prin:
//$url_part_txt_a="agentia-imobiliara-".str_replace(" ","_",$result['name'])."-".str_replace(" ","_",$result['loca']);
?>
$tel = explode(",", $result['telefon']);
foreach ($tel as $t) {
echo "
".$t."
";
}?>
Descriere agentie
//registerDate, nr_cam, sup_util, sup_teren, front_str, compart, confort, etaj, etaj_max, bucatarii, bai, balcoane, an_constr, structura, tip, niveluri, nivel_txt, subsol, demisol, mansarda, sup_con, nr_gar, nr_parc
echo "
".nl2br($result['descriere'])."
";
echo '
';?>
}
if ($result['istoric']){?>
Istoric agentie
".nl2br($result['istoric'])."";;
echo '';?>
}
//echo "select SQL_CALC_FOUND_ROWS id,(select nume from imob_categ where id=ia.idcateg) categ,imagini,nr_cam, titlu,strada,(select localitate from localitati where id=ia.id_loca) localit, pret, moneda from imob_anunturi ia where publicat=1 order by rand() limit 0,8 ";
$result_o = mysql_query("select SQL_CALC_FOUND_ROWS id,tip_tranz,zona,(select nume from imob_categ where id=ia.idcateg) categ,imagini,nr_cam, titlu,strada,(select localitate from localitati where id=ia.id_loca) localit, pret, moneda,pret_unitar,sup_util,etaj_max,etaj,nivel_txt,sup_teren,front_str from imob_anunturi ia where id_agentie='$id_agentie' and publicat=1 order by rand() limit 0,8 ");
$res = mysql_query("SELECT FOUND_ROWS()");
list($total) = mysql_fetch_array($res);
$i_antet=0;
if ($total>0){
if ($i_antet==0){
$url_part_age=str_replace(" ","_",$result['name'])."-".str_replace(" ","_",$result['loca']);
echo '
';
echo '
';
?>
$i_antet=1;
}
$i2=0;
$exista_ofe="";
while ($row = mysql_fetch_assoc($result_o)) {
//=====construiesc url-ul====
if ($row["tip_tranz"]==1)
$tip_tranz_txt='anunt-vanzare-';
elseif ($row["tip_tranz"]==2)
$tip_tranz_txt='anunt-inchiriere-';
elseif ($row["tip_tranz"]==3)
$tip_tranz_txt='anunt-schimb-';
$strarray_ctg=array(" sau ", " pentru "," ");
$categ_txt=strtolower(str_replace($strarray_ctg,"-",$row["categ"])."-");
$localit_txt=str_replace(" ","-",$row["localit"]);
//$localit_txt=str_replace(" ","_",$localit_txt);
$zona_txt="-".str_replace(" ","_",$row["zona"]);
if ($row["nr_cam"])
$cam_txt="-".$row["nr_cam"]."-camere";
else
$cam_txt='';
$url_part_age_anu=$tip_tranz_txt.$categ_txt.$localit_txt.$zona_txt.$cam_txt;
$url_part_alt=str_replace("-"," ",$url_part_age_anu);
//==========================
if ($row["imagini"])
$img_anunt=$row["imagini"];
else
$img_anunt='fara_img.jpg';
//=====construiesc url-ul====
if ($row["tip_tranz"]==1)
$tip_tranz_txt='anunt-vanzare-';
elseif ($row["tip_tranz"]==2)
$tip_tranz_txt='anunt-inchiriere-';
elseif ($row["tip_tranz"]==3)
$tip_tranz_txt='anunt-schimb-';
$strarray_ctg=array(" sau ", " pentru "," ");
$categ_txt=strtolower(str_replace($strarray_ctg,"_",$row["categ"])."-");
$localit_txt=strtolower(str_replace(" ","-",$row["localit"]));
//$localit_txt=str_replace(" ","_",$localit_txt);
$zona_txt="-".strtolower(str_replace(" ","_",$row["zona"]));
if ($row["nr_cam"])
$cam_txt="-".$row["nr_cam"]."-camere";
else
$cam_txt='';
$url_part_txt=$tip_tranz_txt.$categ_txt.$localit_txt.$zona_txt.$cam_txt;
$url_part_alt=str_replace("-"," ",$url_part_txt);
//==========================
$n_subc=$row["categ"];
$exista_ofe=1;
if ($i2==0 || $i2%4==0){
echo "
";
}
echo '
';
echo '
';
//echo '
';
//echo '
';
echo '
';
if ($row["strada"]) $strd='Str. '.$row["strada"].', ';
else $strd='';
echo '
'.$strd.$row["localit"].'
';
if ($row["nr_cam"]==1)
$camere='o camera, ';
elseif ($row["nr_cam"]>1)
$camere=$row["nr_cam"].' camere, ';
else
$camere='';
//if ($idcateg==1 || $idcateg==3 || $idcateg==6) //apartament, casa, pensiune
if ($row["nivel_txt"])
echo '
'.$row["nivel_txt"].', ';
if ($camere && $row["sup_util"])
echo $camere.'suprafata '.$row["sup_util"].' mp, ';
//if ($idcateg==1 || $idcateg==2){ //daca e apartament sau garsoniera
if (empty($row["nivel_txt"])){
if ($row["etaj"] && $row["etaj_max"])
echo 'etaj '.$row["etaj"].' din '.$row["etaj_max"].'
';
if ($row["etaj"] && empty($row["etaj_max"]))
echo 'etaj '.$row["etaj"].'';
if (empty($row["etaj"]) && $row["etaj_max"])
echo 'imobil cu '.$row["etaj_max"].' etaje';
}
//}
//if ($idcateg==3 || $idcateg>=6) //daca e casa, pensiune, spatiu birou, spatiu industrial \
//if ($idcateg>=3){ //daca e casa, pensiune, spatiu birou, spatiu industrial sau teren
if ($row["sup_teren"]){
echo '
'.'teren '.$row["sup_teren"].' mp';
//if ($row["front_str"])
//echo ', front stradal '.$row["front_str"].' m';
echo '
';
}
if ($row['pret_unitar'])
$pret_unitar_txt='/mp';
else
$pret_unitar_txt='';
echo '
Pret: '.str_replace(".",",",$row["pret"]).' euro'.$pret_unitar_txt.'
';
//echo "
".$row["producator"]."
";
echo '
';
if ($i2%4==3){
echo "
";
}
$i2=$i2+1;
}
if (fmod($i2,4)<>0)
echo "
";
echo '